<%= form_for(@comment) do |f| %>
  <% if @comment.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@comment.errors.count, "error") %> prohibited this comment from being saved:</h2>

      <ul>
      <% @comment.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :user %><br />
    <% options = User.all(:order => "name").collect {|user| [user.name,user.id]} %>
    <%= select(:comment, :user_id , options, :prompt => ">> Choose <<") %>
  </div>
  <div class="field">
    <%= f.label :post %><br />
    <% options = Post.all(:order => "title").collect {|post| [post.title,post.id]} %>
    <%= select(:comment, :post_id , options, :prompt => ">> Choose <<") %>
  </div>
  <div class="field">
    <%= f.label :description %><br />
    <%= f.text_area :description %>
  </div>
  <div class="field">
    <%= f.label :father %><br />
    <% options = Comment.all(:order => "description").collect {|comment| [comment.description,comment.id]} %>
    <%= select(:comment, :father_id , options, :prompt => ">> Choose <<") %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
